package com.vsd.repository;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RestResource;

import com.cyz.domain.CateRecommend;

@RestResource(exported = false)
public interface CateRecommendRepository extends CrudRepository<CateRecommend, String> {

	Page<CateRecommend> findByAreaCode(String areaCode,Pageable p);
	
	@Query(" select count(1) from CateRecommend r where r.cateCode = ?1 and r.areaCode = ?2")
	int countByCode(String code,String areaCode);
	
}
